<template>
  <div class="audioBox">
    <audio
        ref="clickAudio"
        src="../../assets/click2.wav"
        id="clickAudio" type="audio/wav">
    </audio>

    <!--    <audio controls id="clickAudio" playsinline>-->
    <!--      <source src="../../assets/clickAudio.wav" type="audio/wav"/>-->
    <!--    </audio>-->

  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  computed: {},
  mounted() {

  },
  methods: {
    // 播放音频
    play() {
      this.$refs.clickAudio.play();
    },
    // 暂停音频
    pause() {
      this.$refs.clickAudio.pause();
    },
  }
};
</script>
<style scoped lang="scss">
.audioBox {
  position: absolute;
  z-index: 999;
}
</style>
